package com.leyou.controller;

import com.leyou.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

@RestController
public class AuthController {
    @Autowired
    private AuthService authService;

    @PostMapping("/toUser")
    public ResponseEntity<String> toUser(Authentication auth){
        return ResponseEntity.ok(auth.getName());
    }

}
